<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Awesome-pyecharts</title>
            <script type="text/javascript" src="https://assets.pyecharts.org/assets/echarts.min.js"></script>
        <script type="text/javascript" src="https://assets.pyecharts.org/assets/jquery.min.js"></script>
        <script type="text/javascript" src="https://assets.pyecharts.org/assets/jquery-ui.min.js"></script>
        <script type="text/javascript" src="https://assets.pyecharts.org/assets/ResizeSensor.js"></script>

            <link rel="stylesheet"  href="https://assets.pyecharts.org/assets/jquery-ui.css">

</head>
<body>
    <style>.box {  }; </style>
        <button onclick="downloadCfg()">Save Config</button>
    <div class="box">
                <div id="8a17dc8c16d54dee8b942c46dddaff81" class="chart-container" style="width:900px; height:500px;"></div>
    <script>
        var chart_8a17dc8c16d54dee8b942c46dddaff81 = echarts.init(
            document.getElementById('8a17dc8c16d54dee8b942c46dddaff81'), 'white', {renderer: 'canvas'});
        var option_8a17dc8c16d54dee8b942c46dddaff81 = {
    "animation": true,
    "animationThreshold": 2000,
    "animationDuration": 1000,
    "animationEasing": "cubicOut",
    "animationDelay": 0,
    "animationDurationUpdate": 300,
    "animationEasingUpdate": "cubicOut",
    "animationDelayUpdate": 0,
    "color": [
        "#c23531",
        "#2f4554",
        "#61a0a8",
        "#d48265",
        "#749f83",
        "#ca8622",
        "#bda29a",
        "#6e7074",
        "#546570",
        "#c4ccd3",
        "#f05b72",
        "#ef5b9c",
        "#f47920",
        "#905a3d",
        "#fab27b",
        "#2a5caa",
        "#444693",
        "#726930",
        "#b2d235",
        "#6d8346",
        "#ac6767",
        "#1d953f",
        "#6950a1",
        "#918597"
    ],
    "series": [
        {
            "type": "bar",
            "name": "\u7ea2\u8272\u9884\u8b66",
            "legendHoverLink": true,
            "data": [
                2,
                "",
                8,
                13
            ],
            "showBackground": false,
            "stack": "stack1",
            "barMinHeight": 0,
            "barCategoryGap": "20%",
            "barGap": "30%",
            "large": false,
            "largeThreshold": 400,
            "seriesLayoutBy": "column",
            "datasetIndex": 0,
            "clip": true,
            "zlevel": 0,
            "z": 2,
            "label": {
                "show": true,
                "position": "inside",
                "color": "black",
                "margin": 8
            },
            "itemStyle": {
                "color": "#EE6666"
            },
            "rippleEffect": {
                "show": true,
                "brushType": "stroke",
                "scale": 2.5,
                "period": 4
            }
        },
        {
            "type": "bar",
            "name": "\u6a59\u8272\u9884\u8b66",
            "legendHoverLink": true,
            "data": [
                4,
                1,
                1,
                ""
            ],
            "showBackground": false,
            "stack": "stack1",
            "barMinHeight": 0,
            "barCategoryGap": "20%",
            "barGap": "30%",
            "large": false,
            "largeThreshold": 400,
            "seriesLayoutBy": "column",
            "datasetIndex": 0,
            "clip": true,
            "zlevel": 0,
            "z": 2,
            "label": {
                "show": true,
                "position": "inside",
                "color": "black",
                "margin": 8
            },
            "itemStyle": {
                "color": "orange"
            },
            "rippleEffect": {
                "show": true,
                "brushType": "stroke",
                "scale": 2.5,
                "period": 4
            }
        },
        {
            "type": "bar",
            "name": "\u9ec4\u8272\u9884\u8b66",
            "legendHoverLink": true,
            "data": [
                "",
                "",
                3,
                1
            ],
            "showBackground": false,
            "stack": "stack1",
            "barMinHeight": 0,
            "barCategoryGap": "20%",
            "barGap": "30%",
            "large": false,
            "largeThreshold": 400,
            "seriesLayoutBy": "column",
            "datasetIndex": 0,
            "clip": true,
            "zlevel": 0,
            "z": 2,
            "label": {
                "show": true,
                "position": "inside",
                "color": "black",
                "margin": 8
            },
            "itemStyle": {
                "color": "yellow"
            },
            "rippleEffect": {
                "show": true,
                "brushType": "stroke",
                "scale": 2.5,
                "period": 4
            }
        },
        {
            "type": "bar",
            "name": "\u84dd\u8272\u9884\u8b66",
            "legendHoverLink": true,
            "data": [
                5,
                2,
                12,
                2
            ],
            "showBackground": false,
            "stack": "stack1",
            "barMinHeight": 0,
            "barCategoryGap": "20%",
            "barGap": "30%",
            "large": false,
            "largeThreshold": 400,
            "seriesLayoutBy": "column",
            "datasetIndex": 0,
            "clip": true,
            "zlevel": 0,
            "z": 2,
            "label": {
                "show": true,
                "position": "inside",
                "color": "black",
                "margin": 8
            },
            "itemStyle": {
                "color": "#5470C6"
            },
            "rippleEffect": {
                "show": true,
                "brushType": "stroke",
                "scale": 2.5,
                "period": 4
            }
        }
    ],
    "legend": [
        {
            "data": [
                "\u7ea2\u8272\u9884\u8b66",
                "\u6a59\u8272\u9884\u8b66",
                "\u9ec4\u8272\u9884\u8b66",
                "\u84dd\u8272\u9884\u8b66"
            ],
            "selected": {
                "\u7ea2\u8272\u9884\u8b66": true,
                "\u6a59\u8272\u9884\u8b66": true,
                "\u9ec4\u8272\u9884\u8b66": true,
                "\u84dd\u8272\u9884\u8b66": true
            },
            "show": true,
            "padding": 5,
            "itemGap": 10,
            "itemWidth": 25,
            "itemHeight": 14
        }
    ],
    "tooltip": {
        "show": true,
        "trigger": "item",
        "triggerOn": "mousemove|click",
        "axisPointer": {
            "type": "line"
        },
        "showContent": true,
        "alwaysShowContent": false,
        "showDelay": 0,
        "hideDelay": 100,
        "textStyle": {
            "fontSize": 14
        },
        "borderWidth": 0,
        "padding": 5
    },
    "xAxis": [
        {
            "name": "\u9884\u8b66\u7ea7\u522b",
            "show": true,
            "scale": false,
            "nameLocation": "end",
            "nameGap": 15,
            "gridIndex": 0,
            "axisTick": {
                "show": false,
                "alignWithLabel": false,
                "inside": false
            },
            "inverse": false,
            "offset": 0,
            "splitNumber": 5,
            "minInterval": 0,
            "splitLine": {
                "show": false,
                "lineStyle": {
                    "show": true,
                    "width": 1,
                    "opacity": 1,
                    "curveness": 0,
                    "type": "solid"
                }
            }
        }
    ],
    "yAxis": [
        {
            "name": "\u5730\u5e02",
            "show": true,
            "scale": false,
            "nameLocation": "end",
            "nameGap": 15,
            "gridIndex": 0,
            "inverse": false,
            "offset": 0,
            "splitNumber": 5,
            "minInterval": 0,
            "splitLine": {
                "show": true,
                "lineStyle": {
                    "show": true,
                    "width": 1,
                    "opacity": 1,
                    "curveness": 0,
                    "type": "solid"
                }
            },
            "data": [
                "\u5a04\u5e95",
                "\u957f\u6c99",
                "\u90b5\u9633",
                "\u76ca\u9633"
            ]
        }
    ],
    "title": [
        {
            "text": "1170\u9879\u76ee\u9884\u8b66\u6570\u91cf",
            "padding": 5,
            "itemGap": 10
        }
    ]
};
        chart_8a17dc8c16d54dee8b942c46dddaff81.setOption(option_8a17dc8c16d54dee8b942c46dddaff81);
    </script>
<br/>                        <style>
            .fl-table {
                margin: 20px;
                border-radius: 5px;
                font-size: 12px;
                border: none;
                border-collapse: collapse;
                max-width: 100%;
                white-space: nowrap;
                word-break: keep-all;
            }

            .fl-table th {
                text-align: left;
                font-size: 20px;
            }

            .fl-table tr {
                display: table-row;
                vertical-align: inherit;
                border-color: inherit;
            }

            .fl-table tr:hover td {
                background: #00d1b2;
                color: #F8F8F8;
            }

            .fl-table td, .fl-table th {
                border-style: none;
                border-top: 1px solid #dbdbdb;
                border-left: 1px solid #dbdbdb;
                border-bottom: 3px solid #dbdbdb;
                border-right: 1px solid #dbdbdb;
                padding: .5em .55em;
                font-size: 15px;
            }

            .fl-table td {
                border-style: none;
                font-size: 15px;
                vertical-align: center;
                border-bottom: 1px solid #dbdbdb;
                border-left: 1px solid #dbdbdb;
                border-right: 1px solid #dbdbdb;
                height: 30px;
            }

            .fl-table tr:nth-child(even) {
                background: #F8F8F8;
            }
        </style>
        <div id="837dfde9100341329715ad66abbe388a" class="chart-container" style="">
            <p class="title" style="font-size: 18px; font-weight:bold;" > 1170项目预警分布</p>
            <p class="subtitle" style="font-size: 12px;" > </p>
            <table class="fl-table">
    <thead>
        <tr>
            <th>地市</th>
            <th>红色预警</th>
            <th>橙色预警</th>
            <th>黄色预警</th>
            <th>蓝色预警</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>娄底1170</td>
            <td>冷水江市-小横冲村居委会不稳定斜坡<br>冷水江市-梓坪学校不稳定斜坡</td>
            <td>冷水江市-张家湾不稳定斜坡<br>新化县-界头岭村滑坡<br>新化县-老屋里滑坡<br>新化县-廖底下滑坡</td>
            <td></td>
            <td>冷水江市-龙台村6组滑坡<br>冷水江市-杉山湾滑坡<br>新化县-大屋场滑坡<br>新化县-曹家排滑坡<br>新化县-篾匠屋里斜坡</td>
        </tr>
        <tr>
            <td>长沙市普适型监测</td>
            <td></td>
            <td>天心区-天心区桂花街道九峰苑社区九峰小区北门滑坡</td>
            <td></td>
            <td>宁乡市-宁乡市黄材镇崔坪村长龙组滑坡<br>雨花区-雨花区洞井街道桃花社区高桥不稳定斜坡</td>
        </tr>
        <tr>
            <td>邵阳市普适型监测项目</td>
            <td>邵东市-石子江滑坡<br>新邵县-土地庙不稳定斜坡<br>新邵县-潭溪镇中学不稳定斜坡<br>洞口县-中村滑坡<br>洞口县-青山岭不稳定斜坡<br>洞口县-八角田滑坡<br>邵阳县-马鞍山滑坡<br>邵阳县-后垅山滑坡</td>
            <td>隆回县-鸡婆岩滑坡</td>
            <td>洞口县-新团滑坡<br>洞口县-向家塘滑坡<br>绥宁县-塘地滑坡</td>
            <td>邵东市-林家排滑坡<br>邵东市-双永小学滑坡<br>新邵县-新田坊滑坡（姚家院子）<br>新邵县-杨梅岐不稳定斜坡<br>新邵县-公屋排不稳定斜坡<br>洞口县-大公村滑坡<br>邵阳县-茶叶山滑坡<br>绥宁县-月形界滑坡<br>绥宁县-半月边滑坡<br>城步县 -黄坪村6组滑坡<br>城步县 -蓬瀛村沙基片6组滑坡<br>大祥区-宗家岭滑坡</td>
        </tr>
        <tr>
            <td>益阳市普适型监测</td>
            <td>安化县-大安村干田界组张白英屋前滑坡<br>安化县-黄金村陶幸福屋后滑坡<br>安化县-谢家园二组滑坡<br>安化县-乐安镇伊中村陂冲组，杨柳组滑坡<br>安化县-青山村3、4组青山滑坡<br>赫山区-蔡细相、刘题名屋后滑坡<br>赫山区-蔡超纲屋后滑坡<br>桃江县-武潭镇新铺子村猫形山组山体滑坡<br>桃江县-鸬鹚渡镇蒋家冲村滑油洞组滑坡<br>桃江县-鸬鹚渡镇大江口村（板溪村）湖田坪组滑坡<br>桃江县-鸬鹚渡镇千工坝村刘家湾组滑坡<br>桃江县-浮邱山乡大水洞村猪棕岭滑坡<br>桃江县-三堂街镇湖莲坪村横仑岩边坡滑坡</td>
            <td></td>
            <td>安化县-敷溪社区滑坡</td>
            <td>安化县-新龙村太桥5组滑坡<br>桃江县-武潭镇莲花坪村偏山上组滑坡</td>
        </tr>
    </tbody>
</table>
        </div>

<br/>    </div>
    <script>
            $('#8a17dc8c16d54dee8b942c46dddaff81').resizable().draggable().css('border-style', 'dashed').css('border-width', '1px');$("#8a17dc8c16d54dee8b942c46dddaff81>div:nth-child(1)").width("100%").height("100%");
            new ResizeSensor(jQuery('#8a17dc8c16d54dee8b942c46dddaff81'), function() { chart_8a17dc8c16d54dee8b942c46dddaff81.resize()});
            $('#837dfde9100341329715ad66abbe388a').resizable().draggable().css('border-style', 'dashed').css('border-width', '1px');$("#837dfde9100341329715ad66abbe388a>div:nth-child(1)").width("100%").height("100%");
            var charts_id = ['8a17dc8c16d54dee8b942c46dddaff81','837dfde9100341329715ad66abbe388a'];
function downloadCfg () {
    const fileName = 'chart_config.json'
    let downLink = document.createElement('a')
    downLink.download = fileName

    let result = []
    for(let i=0; i<charts_id.length; i++) {
        chart = $('#'+charts_id[i])
        result.push({
            cid: charts_id[i],
            width: chart.css("width"),
            height: chart.css("height"),
            top: chart.offset().top + "px",
            left: chart.offset().left + "px"
        })
    }

    let blob = new Blob([JSON.stringify(result)])
    downLink.href = URL.createObjectURL(blob)
    document.body.appendChild(downLink)
    downLink.click()
    document.body.removeChild(downLink)
}
    </script>
</body>
</html>
